<?php
/* @var $this ParnerController */
/* @var $model Parner */
/* @var $form CActiveForm */
?>
<script src="<?php echo Yii::app()->baseUrl . '/ckeditor/ckeditor.js'; ?>"></script>
<div class="form">

    <?php
    $form = $this->beginWidget('CActiveForm', array(
        'id' => 'parner-_Parner-form',
        // Please note: When you enable ajax validation, make sure the corresponding
        // controller action is handling ajax validation correctly.
        // See class documentation of CActiveForm for details on this,
        // you need to use the performAjaxValidation()-method described there.
        'enableAjaxValidation' => false,
        'htmlOptions' => array('enctype' => 'multipart/form-data'),
    ));
    ?>



    <?php echo $form->errorSummary($model); ?>

    <div class="clear"></div>
    <div class="form_left">
        <?php echo $form->labelEx($model, 'hovaten'); ?>
    </div>
    <div class="form_right">
        <?php echo $form->textField($model, 'hovaten', array('size' => 70, 'maxlength' => 100, 'required' => 'required')); ?>
        <?php echo $form->error($model, 'hovaten'); ?>
    </div>
    <div class="clear"></div>
    <div class="form_left">
        <?php echo $form->labelEx($model, 'doanluatsu'); ?>
    </div>
    <div class="form_right">
        <?php
        $category_ = Doanluatsu::model()->findAll();

        $list_ = CHtml::listData($category_, 'id', 'name');
        echo $form->dropDownList($model, 'doanluatsu', $list_);
        ?>
        <?php echo $form->error($model, 'doanluatsu'); ?>
    </div>

    <div class="clear"></div>
    <div class="form_left">
        <?php echo $form->labelEx($model, 'chungchihanhnghe'); ?>
    </div>
    <div class="form_right">
        <?php echo $form->textField($model, 'chungchihanhnghe', array('size' => 70, 'maxlength' => 200, 'required' => 'required')); ?>
        <?php echo $form->error($model, 'chungchihanhnghe'); ?>
    </div>

    <div class="clear"></div>
    <div class="form_left">
        <?php echo $form->labelEx($model, 'theluatsu'); ?>
    </div>
    <div class="form_right">
        <?php echo $form->textField($model, 'theluatsu', array('size' => 70, 'maxlength' => 200, 'required' => 'required')); ?>
        <?php echo $form->error($model, 'theluatsu'); ?>
    </div>

    <div class="clear"></div>
    <div class="form_left">
        <?php echo $form->labelEx($model, 'chucvu'); ?>
    </div>
    <div class="form_right">
        <?php echo $form->textField($model, 'chucvu', array('size' => 70, 'maxlength' => 200)); ?>
        <?php echo $form->error($model, 'chucvu'); ?>
    </div>


    <div class="clear"></div>
    <div class="form_left">
        <?php echo $form->labelEx($model, 'tencongty'); ?>
    </div>
    <div class="form_right">
        <?php echo $form->textField($model, 'tencongty', array('size' => 70, 'maxlength' => 200)); ?>
        <?php echo $form->error($model, 'tencongty'); ?>
    </div>
    <div class="clear"></div>
    <div class="form_left">
        <?php echo $form->labelEx($model, 'diachi'); ?>
    </div>
    <div class="form_right">
        <?php echo $form->textField($model, 'diachi', array('size' => 70, 'maxlength' => 200)); ?>
        <?php echo $form->error($model, 'diachi'); ?>
    </div>

    <div class="clear"></div>
    <div class="form_left">
        <?php echo $form->labelEx($model, 'logo'); ?>
    </div>
    <div class="form_right">
        <?php echo $form->fileField($model, 'logo', array('size' => 40, 'maxlength' => 50)); ?>
        <?php echo $form->error($model, 'logo'); ?>
    </div>
    <div class="clear"></div>




    <div class="form_left">
        <?php echo $form->labelEx($model, 'email'); ?>
    </div>
    <div class="form_right">
        <?php echo $form->textField($model, 'email', array('size' => 70, 'maxlength' => 200)); ?>
        <?php echo $form->error($model, 'email'); ?>
    </div>

    <div class="clear"></div>
    <div class="form_left">
        <?php echo $form->labelEx($model, 'website', array('size' => 70, 'maxlength' => 200)); ?>
    </div>
    <div class="form_right">
        <?php echo $form->textField($model, 'website'); ?>
        <?php echo $form->error($model, 'website'); ?>
    </div>

    <div class="clear"></div>
    <div class="form_left">
        <?php echo $form->labelEx($model, 'phone'); ?>
    </div>
    <div class="form_right">
        <?php echo $form->textField($model, 'phone', array('size' => 50, 'maxlength' => 50)); ?>
        <?php echo $form->error($model, 'phone'); ?>
    </div>

    <div class="clear"></div>
    <div class="form_left">
        <?php echo $form->labelEx($model, 'fax'); ?>
    </div>
    <div class="form_right">
        <?php echo $form->textField($model, 'fax', array('size' => 50, 'maxlength' => 50)); ?>
        <?php echo $form->error($model, 'fax'); ?>
    </div>


    <div class="clear"></div>
    <div class="form_left">
        Tư vấn pháp luật
    </div>
    <div class="form_right">
        <div style="float: left">
            <?php echo $form->checkBox($model, 'tvdansu', array('value' => 1, 'uncheckValue' => 0)); ?>
        </div>
        <div style="width: 300px; margin-left: 20px">
            <?php echo $form->labelEx($model, 'tvdansu'); ?>
        </div>
        
        <div style="float: left">
            <?php echo $form->checkBox($model, 'tvhinhsu', array('value' => 1, 'uncheckValue' => 0)); ?>
        </div>
        <div style="width: 300px; margin-left: 20px">
            <?php echo $form->labelEx($model, 'tvhinhsu'); ?>
        </div>
        
        <div style="float: left">
            <?php echo $form->checkBox($model, 'tvhanhchinh', array('value' => 1, 'uncheckValue' => 0)); ?>
        </div>
        <div style="width: 300px; margin-left: 20px">
            <?php echo $form->labelEx($model, 'tvhanhchinh'); ?>
        </div>
        
         <div style="float: left">
            <?php echo $form->checkBox($model, 'tvtkinhdoanh', array('value' => 1, 'uncheckValue' => 0)); ?>
        </div>
        <div style="width: 300px; margin-left: 20px">
            <?php echo $form->labelEx($model, 'tvtkinhdoanh'); ?>
        </div>
        
         <div style="float: left">
            <?php echo $form->checkBox($model, 'tvkhac', array('value' => 1, 'uncheckValue' => 0)); ?>
        </div>
        <div style="width: 300px; margin-left: 20px">
            <?php echo $form->labelEx($model, 'tvkhac'); ?>
        </div>
    </div>
    
      <div class="clear"></div>
    <div class="form_left">
        Dịch vụ pháp lý
    </div>
    <div class="form_right">
        <div style="float: left">
            <?php echo $form->checkBox($model, 'dvdansu', array('value' => 1, 'uncheckValue' => 0)); ?>
        </div>
        <div style="width: 300px; margin-left: 20px">
            <?php echo $form->labelEx($model, 'dvdansu'); ?>
        </div>
        
        <div style="float: left">
            <?php echo $form->checkBox($model, 'dvhanhchinh', array('value' => 1, 'uncheckValue' => 0)); ?>
        </div>
        <div style="width: 300px; margin-left: 20px">
            <?php echo $form->labelEx($model, 'dvhanhchinh'); ?>
        </div>
        
        <div style="float: left">
            <?php echo $form->checkBox($model, 'dvkinhdoanh', array('value' => 1, 'uncheckValue' => 0)); ?>
        </div>
        <div style="width: 300px; margin-left: 20px">
            <?php echo $form->labelEx($model, 'dvkinhdoanh'); ?>
        </div>
        
         <div style="float: left">
            <?php echo $form->checkBox($model, 'dvkhac', array('value' => 1, 'uncheckValue' => 0)); ?>
        </div>
        <div style="width: 300px; margin-left: 20px">
            <?php echo $form->labelEx($model, 'dvkhac'); ?>
        </div>
        
         
    </div>
    <div class="clear"></div>

    <div class="form_left">
        Tố tụng tòa án
    </div>
    <div class="form_right">
        <div style="float: left">
            <?php echo $form->checkBox($model, 'ttadansu', array('value' => 1, 'uncheckValue' => 0)); ?>
        </div>
        <div style="width: 300px; margin-left: 20px">
            <?php echo $form->labelEx($model, 'ttadansu'); ?>
        </div>
        
        <div style="float: left">
            <?php echo $form->checkBox($model, 'ttahinhsu', array('value' => 1, 'uncheckValue' => 0)); ?>
        </div>
        <div style="width: 300px; margin-left: 20px">
            <?php echo $form->labelEx($model, 'ttahinhsu'); ?>
        </div>
        
        <div style="float: left">
            <?php echo $form->checkBox($model, 'ttahanhchinh', array('value' => 1, 'uncheckValue' => 0)); ?>
        </div>
        <div style="width: 300px; margin-left: 20px">
            <?php echo $form->labelEx($model, 'ttahanhchinh'); ?>
        </div>
        
         <div style="float: left">
            <?php echo $form->checkBox($model, 'ttakinhdoanh', array('value' => 1, 'uncheckValue' => 0)); ?>
        </div>
        <div style="width: 300px; margin-left: 20px">
            <?php echo $form->labelEx($model, 'ttakinhdoanh'); ?>
        </div>
        
        
    </div>
    
    <div class="clear"></div>
    <div class="form_left">
        Tố tụng trọng tài
    </div>
    <div class="form_right">
         <div style="float: left">
            <?php echo $form->checkBox($model, 'tttkinhdoanh', array('value' => 1, 'uncheckValue' => 0)); ?>
        </div>
        <div style="width: 300px; margin-left: 20px">
            <?php echo $form->labelEx($model, 'tttkinhdoanh'); ?>
        </div>
        
        
    </div>
    
    <div class="clear"></div>

    <div class="form_left">
        <?php echo $form->labelEx($model, 'discription'); ?>
    </div>
    <div class="form_right">
        <?php echo $form->textArea($model, 'discription', array('size' => 70, 'maxlength' => 400)); ?>
        <?php echo $form->error($model, 'discription'); ?>
    </div>
    <div class="clear"></div>
    <div class="form_left">
        <?php echo $form->labelEx($model, 'keyword'); ?>
    </div>
    <div class="form_right">
        <?php echo $form->textArea($model, 'keyword', array('size' => 70, 'maxlength' => 300)); ?>
        <?php echo $form->error($model, 'keyword'); ?>
    </div>



    <div class="clear"></div>
    <div class="form_left">
        <?php echo $form->labelEx($model, 'gioithieu'); ?>
    </div>
    <div class="form_right">
        <?php echo $form->textArea($model, 'gioithieu', array('id' => 'editor1')); ?>
        <?php echo $form->error($model, 'gioithieu'); ?>
    </div>

    <div class="clear"></div>
    <div class="form_left">
        <?php echo $form->labelEx($model, 'nhanhieu'); ?>
    </div>
    <div class="form_right">
        <?php echo $form->textArea($model, 'nhanhieu', array('id' => 'editor2')); ?>
        <?php echo $form->error($model, 'nhanhieu'); ?>
    </div>

    <div class="clear"></div>
    <div class="form_left">
        <?php echo $form->labelEx($model, 'sanpham'); ?>
    </div>
    <div class="form_right">
        <?php echo $form->textArea($model, 'sanpham', array('id' => 'editor3')); ?>
        <?php echo $form->error($model, 'sanpham'); ?>
    </div>

    <div class="clear"></div>
    <div class="form_left">
        <?php echo $form->labelEx($model, 'tinquangcao'); ?>
    </div>
    <div class="form_right">
        <?php echo $form->textArea($model, 'tinquangcao', array('id' => 'editor4')); ?>
        <?php echo $form->error($model, 'tinquangcao'); ?>
    </div>

    <div class="clear"></div>
    <div class="form_left">
        <?php echo $form->labelEx($model, 'chungnhan'); ?>
    </div>
    <div class="form_right">
        <?php echo $form->textArea($model, 'chungnhan', array('id' => 'editor5')); ?>
        <?php echo $form->error($model, 'chungnhan'); ?>
    </div>

    <div class="clear"></div>
    <div class="form_left">
        <?php echo $form->labelEx($model, 'tuyendung'); ?>
    </div>
    <div class="form_right">
        <?php echo $form->textArea($model, 'tuyendung', array('id' => 'editor6')); ?>
        <?php echo $form->error($model, 'tuyendung'); ?>
    </div>

    <div class="clear"></div>

    <?php
    $session = new CHttpSession;
    $session->open();

    $userID = $session['user_salesmart'][1];
    if ($userID > 98) {
        ?>
        <div class="form_left">
            <?php echo $form->labelEx($model, 'flag'); ?>
        </div>
        <div class="form_right">
            <?php echo $form->dropDownList($model, 'flag', array('0' => 'Đang ẩn', '1' => 'Đang hiện')); ?>
            <?php echo $form->error($model, 'flag'); ?>
        </div>
    <?php } ?>
    <div class="clear"></div>
    <div class="form_left">.
    </div>
    <div class="form_right">
        <?php echo CHtml::submitButton('Cập nhật'); ?>
    </div>

    <?php $this->endWidget(); ?>
    <script type="text/javascript">
        CKEDITOR.replace('editor1', {
            filebrowserBrowseUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/browse.php?type=files',
            filebrowserImageBrowseUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/browse.php?type=images',
            filebrowserFlashBrowseUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/browse.php?type=flash',
            filebrowserUploadUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/upload.php?type=files',
            filebrowserImageUploadUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/upload.php?type=images',
            filebrowserFlashUploadUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/upload.php?type=flash'
        });

        CKEDITOR.replace('editor2', {
            filebrowserBrowseUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/browse.php?type=files',
            filebrowserImageBrowseUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/browse.php?type=images',
            filebrowserFlashBrowseUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/browse.php?type=flash',
            filebrowserUploadUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/upload.php?type=files',
            filebrowserImageUploadUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/upload.php?type=images',
            filebrowserFlashUploadUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/upload.php?type=flash'
        });


        CKEDITOR.replace('editor3', {
            filebrowserBrowseUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/browse.php?type=files',
            filebrowserImageBrowseUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/browse.php?type=images',
            filebrowserFlashBrowseUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/browse.php?type=flash',
            filebrowserUploadUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/upload.php?type=files',
            filebrowserImageUploadUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/upload.php?type=images',
            filebrowserFlashUploadUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/upload.php?type=flash'
        });

        CKEDITOR.replace('editor4', {
            filebrowserBrowseUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/browse.php?type=files',
            filebrowserImageBrowseUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/browse.php?type=images',
            filebrowserFlashBrowseUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/browse.php?type=flash',
            filebrowserUploadUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/upload.php?type=files',
            filebrowserImageUploadUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/upload.php?type=images',
            filebrowserFlashUploadUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/upload.php?type=flash'
        });
        CKEDITOR.replace('editor5', {
            filebrowserBrowseUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/browse.php?type=files',
            filebrowserImageBrowseUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/browse.php?type=images',
            filebrowserFlashBrowseUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/browse.php?type=flash',
            filebrowserUploadUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/upload.php?type=files',
            filebrowserImageUploadUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/upload.php?type=images',
            filebrowserFlashUploadUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/upload.php?type=flash'
        });
        CKEDITOR.replace('editor6', {
            filebrowserBrowseUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/browse.php?type=files',
            filebrowserImageBrowseUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/browse.php?type=images',
            filebrowserFlashBrowseUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/browse.php?type=flash',
            filebrowserUploadUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/upload.php?type=files',
            filebrowserImageUploadUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/upload.php?type=images',
            filebrowserFlashUploadUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/upload.php?type=flash'
        });
    </script>

    <script type="text/javascript">
        function myformatter(date) {
            var y = date.getFullYear();
            var m = date.getMonth() + 1;
            var d = date.getDate();
            return y + '-' + (m < 10 ? ('0' + m) : m) + '-' + (d < 10 ? ('0' + d) : d);
        }
        function myparser(s) {
            if (!s)
                return new Date();
            var ss = (s.split('-'));
            var y = parseInt(ss[0], 10);
            var m = parseInt(ss[1], 10);
            var d = parseInt(ss[2], 10);
            if (!isNaN(y) && !isNaN(m) && !isNaN(d)) {
                return new Date(y, m - 1, d);
            } else {
                return new Date();
            }
        }
    </script>
</div><!-- form -->
